package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author YuanYuan
 * @Date 2024/5/6
 * @Time 17:03
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/hi")
    public String sayHi(String name){
        System.out.println("执行了sayhi方法");
        return "Hi,"+ name;
    }

    @RequestMapping("/hello")
    public String sayHello(){
        System.out.println("执行了sayhello方法");
        return "Hello,world";
    }
}
